fix(i18n): make zh pages render Chinese content + add zh install page#750
Conversation
- Remove `force-static` from [product]/[filename] route so getLocale() reads the x-language header at request time (force-static froze locale to build-time "en", causing /zh/pricing etc. to render English). - Add content/pages/YakShaver/zh/install.json (Chinese install page; previously fell back to English due to missing file). - Align zh navigation bar structure with the English version (add Install item, openInNewTab flags, CONTACT US + Portal buttons) keeping Chinese labels. - Include pre-existing zh/home.json content tweaks. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
https://github.com/SSWConsulting/SSW.Products/blob/fc9ba47d70c6f8acabf2085179ded7d92959c50c/app/[product]/[filename]/page.tsx#L19
Forward the locale before relying on getLocale
When a /zh/... URL or .cn host reaches this now-dynamic page, getLocale() still reads headers().get('x-language'), but middleware.ts:createRewriteResponse only sets x-language on the response via response.headers.set(...) and never forwards it in the rewritten request headers. In that scenario the page continues to fall back to en, so routes such as /zh/pricing and the new /zh/install still render English content despite removing force-static.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
force-staticfrom [product]/[filename] route so getLocale() reads the x-language header at request time (force-static froze locale to build-time "en", causing /zh/pricing etc. to render English).